BridgeJS: fix: switch to direct TypeSyntax initialiser#445
Merged
kateinoigakukun merged 1 commit intoswiftwasm:mainfrom Sep 11, 2025
Merged
BridgeJS: fix: switch to direct TypeSyntax initialiser#445kateinoigakukun merged 1 commit intoswiftwasm:mainfrom
kateinoigakukun merged 1 commit intoswiftwasm:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Fixes a compilation issue in BridgeJS by updating the handling of SwiftSyntax generic arguments to use direct TypeSyntax initializers instead of accessing the .argument property directly. This addresses breaking changes in newer SwiftSyntax versions where the argument property returns a wrapper type instead of TypeSyntax.
- Updates generic argument handling to use TypeSyntax initializer for compatibility
- Fixes two instances in the
lookupTypemethod for both identifier and member type handling
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Member
kateinoigakukun
left a comment
There was a problem hiding this comment.
Could you add a runtime test case to cover the case to keep it compiled?
kateinoigakukun
approved these changes
Sep 11, 2025
Member
kateinoigakukun
left a comment
There was a problem hiding this comment.
Sorry, I was confused. Given that it's an issue at the compile-time of BridgeJSCore, we don't need a runtime test case 🙇
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates
ExportSwift.lookupTypeto handle changes introduced in newer SwiftSyntax, that would result in failed compilation with errors like:This happened because in newer SwiftSyntax the
.argumentproperty of GenericArgumentSyntax no longer returns a TypeSyntax directly, but a new wrapper type (GenericArgumentSyntax.Argument).I've just noticed this while working with other wasm32 Swift SDK with threads support, update approach should work properly for all sdk versions.